# 斐波那契数列 1 1 2 3 5 8
index = 6
if index < 1:
    print("数列下标有误！必须大于等于1")
elif index <= 2:
    print("1")
else:
    fib1 = 1
    fib2 = 1
    fib3 = 0
    for i in range(2, index):
        fib3 = fib1 + fib2
        fib1 = fib2
        fib2 = fib3
    print(fib3)
